<%@ Page Language="C#" MasterPageFile="~/MainMaster.master" AutoEventWireup="true" CodeFile="SearchDentist_adv.aspx.cs" Inherits="SearchDentists_adv" Title="Search Doctors" EnableEventValidation="false" %>


<%@ Register Src="~/includes/DoctorMenu.ascx" TagName="DoctorMenu" TagPrefix="uc1" %>
<%@ MasterType VirtualPath="~/MainMaster.master" %>


<asp:Content ID="MainContent" ContentPlaceHolderID="MainTable" runat="server">

    <script>

        //<![CDATA[ 

      <%if (IsPostBack)
        {%>
        showWorking();
      <%} %>

        function selectDistance(obj) {
            if (obj.value != 0) {
                if (trim(document.getElementById('<%=txtCity.ClientID%>').value) == "" && trim(document.getElementById('<%=txtZipCode.ClientID%>').value) == "") {
                    obj.value = 0;
                    alert("Please enter a city name or zip code to utilize Travel Distance feature");
                    return false;
                }
                if (trim(document.getElementById('<%=txtCity.ClientID%>').value) != "" && trim(document.getElementById('<%=txtZipCode.ClientID%>').value) == "" && trim(document.getElementById('<%=ddlState.ClientID%>').value) == "0") {
                    alert("Please select a state to utilize Travel Distance feature with city");
                    return false;
                }
            }
            return true;
        }

        function checkError() {
            arr = new Array(
            document.getElementById('<%=ddlState.ClientID%>'),
        document.getElementById('<%=txtCity.ClientID%>'),
        document.getElementById('<%=txtZipCode.ClientID%>'),
        document.getElementById('<%=txtLName.ClientID%>'),
        document.getElementById('<%=txtFName.ClientID%>'),
        document.getElementById('<%=ddlSpeciality.ClientID%>'),
    //   document.getElementById('< %=ddlSubSpeciality.ClientID%>'),
    //   document.getElementById('< %=lsthospital.ClientID%>'),
        document.getElementById('<%=lstInsurance.ClientID%>'),
        document.getElementById('<%=ddlTraining.ClientID%>'),
        document.getElementById('<%=ddlMedicalSchool.ClientID%>'),
        document.getElementById('<%=ddlExpertise.ClientID%>'),
        document.getElementById('<%=ddlHAffiliations.ClientID%>'),
        document.getElementById('<%=ddlPeerReview.ClientID%>'),
        document.getElementById('<%=ddlPatientReview.ClientID%>'),
        document.getElementById('<%=ddlOfficeStaff.ClientID%>'),
        document.getElementById('<%=ddlOfficeSetting.ClientID%>'),
        document.getElementById('<%=ddlWaitTime.ClientID%>'),
        document.getElementById('<%=ddlClinical.ClientID%>'),
        document.getElementById('<%=ddlBedsideManner.ClientID%>'),
        document.getElementById('<%=ddlPatientConfidence.ClientID%>'),
        document.getElementById('<%=ddlImpressions.ClientID%>'),
        document.getElementById('<%=ddlCost.ClientID%>'));
            count = 0;
            for (i = 0; i < arr.length; i++) {
                if (trim(eval(arr[i]).value) != "0" && trim(eval(arr[i]).value) != "" && trim(eval(arr[i]).value) != "0,0") {
                    count++;
                }
            }
            if (count < 2) {
                alert("Please select atleast 2 conditions for search");
                return false;
            }
            showWorking();
            return true;
        }
        function setEnableDisableDDL(id, name) {

            if (name == 'training') {
                ddlTraining = document.getElementById(id);

                if (ddlTraining.selectedIndex == 0) {
                    document.getElementById('<%=ddlMedicalSchool.ClientID%>').disabled = false;
                }
                else {
                    document.getElementById('<%=ddlMedicalSchool.ClientID%>').disabled = true;
                }
            }

            if (name == 'expertise') {
                ddlExpertise = document.getElementById(id);
                if (ddlExpertise.selectedIndex == '0') {
                    document.getElementById('<%=ddlHAffiliations.ClientID%>').disabled = false;
                document.getElementById('<%=ddlPeerReview.ClientID%>').disabled = false;
                document.getElementById('<%=ddlExperience.ClientID%>').disabled = false;
            }
            else {
                document.getElementById('<%=ddlHAffiliations.ClientID%>').disabled = true;
                document.getElementById('<%=ddlPeerReview.ClientID%>').disabled = true;
                document.getElementById('<%=ddlExperience.ClientID%>').disabled = true;
            }
        }
        if (name == 'patientreview') {
            ddlPatientReview = document.getElementById(id);
            if (ddlPatientReview.selectedIndex == '0') {
                document.getElementById('<%=ddlOfficeStaff.ClientID%>').disabled = false;
                   document.getElementById('<%=ddlOfficeSetting.ClientID%>').disabled = false;
                   document.getElementById('<%=ddlWaitTime.ClientID%>').disabled = false;
                   document.getElementById('<%=ddlClinical.ClientID%>').disabled = false;
                   document.getElementById('<%=ddlBedsideManner.ClientID%>').disabled = false;
                   document.getElementById('<%=ddlPatientConfidence.ClientID%>').disabled = false;
                   document.getElementById('<%=ddlImpressions.ClientID%>').disabled = false;
               }
               else {
                   document.getElementById('<%=ddlOfficeStaff.ClientID%>').disabled = true;
                   document.getElementById('<%=ddlOfficeSetting.ClientID%>').disabled = true;
                   document.getElementById('<%=ddlWaitTime.ClientID%>').disabled = true;
                   document.getElementById('<%=ddlClinical.ClientID%>').disabled = true;
                   document.getElementById('<%=ddlBedsideManner.ClientID%>').disabled = true;
                   document.getElementById('<%=ddlPatientConfidence.ClientID%>').disabled = true;
                   document.getElementById('<%=ddlImpressions.ClientID%>').disabled = true;
               }
           }

       }
       function onload() {
           //setEnableDisableDDL("<% =ddlTraining.ClientID%> ","training");
           //setEnableDisableDDL("<% =ddlExpertise.ClientID%> ","expertise");
           //setEnableDisableDDL("<% =ddlPatientReview.ClientID%> ","patientreview");
       }
       //]]> 
    </script>
    <asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <div class="heading_inner">
                <div class="heading_topic">
                    <h2>Dentist Advanced Search</h2>
                </div>
            </div>

            <div class="cl"></div>

            <div class="left-side fl" style="float: right">


                <uc1:DoctorMenu ID="DoctorMenu1" runat="server" />
                <br />
                <div style="width: 100%; text-align: center">
                    <%if (lblMsg.Text.Trim().Length > 0)
                      { %>

                    <asp:Label ID="lblMsg" runat="server" Font-Size="Larger" Width="100%"></asp:Label>

                    <%} %>
                </div>
            </div>
            <!---/ Left wrapper -->

        <div class="form_rgist">
    <div id="TabbedPanels1" class="TabbedPanels">
      <ul class="TabbedPanelsTabGroup">
        <li class="TabbedPanelsTab" tabindex="0"><a href='SearchDoctors_adv.aspx' style="text-decoration:none">FIND A DOCTOR</a></li>
        <li class="TabbedPanelsTab TabbedPanelsTabSelected" tabindex="0">FIND A DENTIST</li>
      </ul>
      <div class="TabbedPanelsContentGroup">
        <!--**Content 1 Starts Here**--><div class="TabbedPanelsContent">

      

                    <div class="find_doc">

                        <div class="part_1">


                            <div class="upper">

                                <div class="lft_up"></div>
                                <div class="center_stroke">
                                    <div class="form_head">Step 01 Dentist Information</div>
                                </div>
                                <div class="right_up"></div>
                            </div>


                            <div class="doc_info">
                                <table width="370" border="0" cellspacing="3" class="table_info">
                                    <tr>
                                        <td width="141">COUNTRY : </td>
                                        <td width="229">


                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlCountry" runat="server"
                                                EnableViewState="true" Width="220px" AutoPostBack="True"
                                                OnSelectedIndexChanged="ddlCountry_SelectedIndexChanged" /></div>



                                        </td>
                                    </tr>
                                    <tr>
                                        <td>STATE : </td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlState" runat="server" EnableViewState="true" Width="220px" /></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>CITY : </td>
                                        <td>
                                            <asp:TextBox ID="txtCity" runat="server" MaxLength="50" Width="200px" CssClass="design"></asp:TextBox></td>
                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">OR</td>
                                        <td></td>
                                    </tr>
                                    <tr>
                                        <td>ZIP CODE: </td>
                                        <td>

                                            <asp:TextBox ID="txtZipCode" runat="server" MaxLength="10" Width="200px" CssClass="design"></asp:TextBox>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td>TRAVEL DISTANCE: </td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlDistance" runat="server" onchange="selectDistance(this)" Width="220px">
                                                <asp:ListItem Value="0">Select</asp:ListItem>
                                                <asp:ListItem Value="5">5 miles or less</asp:ListItem>
                                                <asp:ListItem Value="10">10 miles or less</asp:ListItem>
                                                <asp:ListItem Value="25">25 miles or less</asp:ListItem>
                                                <asp:ListItem Value="50">50 miles or less</asp:ListItem>
                                                <asp:ListItem Value="100">100 miles or less</asp:ListItem>
                                            </asp:DropDownList></div>
                                        </td>
                                    </tr>






                                    <tr>
                                        <td>FIRST NAME: </td>
                                        <td>

                                            <asp:TextBox ID="txtFName" runat="server" MaxLength="50" Width="200px" CssClass="design"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>LAST NAME:</td>
                                        <td>
                                            <asp:TextBox ID="txtLName" runat="server" MaxLength="50" Width="200px" CssClass="design"></asp:TextBox>

                                        </td>



                                    </tr>
                                    <tr>
                                        <td>ALL SPECIALTIES:</td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlSpeciality" Width="220px" runat="server" EnableViewState="true">
                                            </asp:DropDownList></div>
                                        </td>
                                    </tr>
                                    <tr runat="server" id="trOldAllSpec" visible="false">
                                        <td>ALL SPECIALTIES:</td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlSubSpeciality" runat="server" EnableViewState="true" Visible="False" Width="220px">
                                            </asp:DropDownList></div></td>

                                    </tr>
                                    <tr>
                                        <td>INSURANCE :</td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="lstInsurance" Width="220px" runat="server" EnableViewState="False">
                                            </asp:DropDownList></div>
                                        </td>
                                    </tr>
                                </table>

                            </div>





                            <div class="upper">

                                <div class="lft_up"></div>
                                <div class="center_stroke">
                                    <div class="form_head">Step 02 Dentist Rating</div>
                                </div>
                                <div class="right_up"></div>
                            </div>


                            <div class="doc_infonew">
                                <table width="370" border="0" cellspacing="3" class="table_info">


                                    <tr>
                                        <td width="141px"><a href="<%=Session["strHttp"]%>definitions.aspx#1" target="_blank">TRAINING</a> : </td>
                                        <td width="229px">
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlTraining" runat="server" style="width: 220px">
                                            </asp:DropDownList></div></td>

                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">OR </td>
                                        <td></td>

                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#8" target="_blank">Medical School:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlMedicalSchool" runat="server" Width="220px"></asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold"><br /><br /> </td>
                                        <td></td>

                                    </tr>

                                    <tr>
                                        <td width="141px"><a href="<%=Session["strHttp"]%>definitions.aspx#2" target="_blank">EXPERTISE</a> : </td>
                                        <td width="229px">
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlExpertise" runat="server" style="width: 220px"></asp:DropDownList></div></td>

                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">OR </td>
                                        <td></td>

                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#16" target="_blank">Hospital Affiliation:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlHAffiliations" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#7" target="_blank">Dentist Endorsements:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlPeerReview" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#17" target="_blank">Years of Experience:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlExperience" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                      <tr>
                                        <td style="font-weight: bold"><br /><br /> </td>
                                        <td></td>

                                    </tr>
                                    <tr>
                                        <td width="141px"><a href="<%=Session["strHttp"]%>definitions.aspx#3" target="_blank">PATIENT OPINION</a> : </td>
                                        <td width="229px">
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlPatientReview" runat="server" style="width: 220px">
                                            </asp:DropDownList></div></td>

                                    </tr>
                                    <tr>
                                        <td style="font-weight: bold">OR </td>
                                        <td></td>

                                    </tr>

                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#5" target="_blank">Office Staff:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlOfficeStaff" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#18" target="_blank">Office Setting:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlOfficeSetting" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#6" target="_blank">Wait Time:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlWaitTime" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#19" target="_blank">Dental &nbsp;Knowledge:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlClinical" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#4" target="_blank">Bedside Manner:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlBedsideManner" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#20" target="_blank">Patient Confidence:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlPatientConfidence" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                    <tr>
                                        <td style="padding-left: 15px"><a href="<%=Session["strHttp"]%>definitions.aspx#21" target="_blank">Patient Satisfaction:</a></td>
                                        <td>
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlImpressions" runat="server" Width="220px">
                                            </asp:DropDownList></div></td>
                                    </tr>
                                      <tr>
                                        <td style="font-weight: bold"><br /> </td>
                                        <td></td>

                                    </tr>
                                    <tr>
                                        <td width="141px">Cost: : </td>
                                        <td width="229px">
                                            <div class="styled-select" style="width: 200px"><asp:DropDownList ID="ddlCost" runat="server" style="width: 220px">
                                                <asp:ListItem Text="Select" Value="0"></asp:ListItem>
                                                <asp:ListItem Text="$" Value="1"></asp:ListItem>
                                                <asp:ListItem Text="$$" Value="2"></asp:ListItem>
                                                <asp:ListItem Text="$$$" Value="3"></asp:ListItem>
                                                <asp:ListItem Text="$$$$" Value="4"></asp:ListItem>
                                                <asp:ListItem Text="$$$$$" Value="5"></asp:ListItem>
                                            </asp:DropDownList></div></td>
                                    </tr>







                                </table>

                            </div>
                            <table style="float: left; padding: 10px 0px 0px 50px;">
                                <tr>
                                    <td>
                                        <asp:Button ID="btnSubmit" runat="server" Text="Submit" CssClass="buttonclass" OnClick="btnSubmit_Click" /><a href="#"></a>
                                    </td>
                                    <td style="padding-left:10px">
                                        <a href="<%=Session["strHttp"]%>SearchDentist_adv.aspx" onclick="loginlayer();" style="padding:6px 15px" class="buttonclass"  >New Search</a>
                                        <%--<a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image52','','images/new_srchhvr.png',1)">
                                            <img border="0" width="123" height="38" src="images/new_srch.png" alt="" onclick="JavaScript:document.forms(0).reset(); setEnableDisableDDL('<%=ddlTraining.ClientID%>','training'); setEnableDisableDDL('<%=ddlExpertise.ClientID%>','expertise'); setEnableDisableDDL('<%=ddlPatientReview.ClientID%>','patientreview');" /></a>--%>
                                    </td>
                                </tr>
                            </table>


                        </div>



                        <div class="part_2">
                            <div class="upper">

                                <div class="lft_up"></div>

                                <div class="center_stroke">
                                    <div class="form_head">Helpful Hint:</div>
                                </div>
                                <div class="right_up"></div>
                            </div>

                            <div class="doc_hint">
                                <div class="hint_content">
                                    You can search by any one field or all fields in either of the below Steps. In 'Step 2: Dentist Rating', you may search by overall Categories (Training, Expertise, Patient Opinion) or Subcategories.
                                </div>
                            </div>




                            <div class="upper">

                                <div class="lft_up"></div>
                                <div class="center_stroke">
                                    <div class="form_head">Key</div>
                                </div>
                                <div class="right_up"></div>
                            </div>


                            <div class="doc_key">

                                <div class="key_content">
                                    <table width="200" border="0">
                                        <tr>
                                            <td>Excellent</td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                        </tr>
                                        <tr>
                                            <td>Very Good</td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>&nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td>Good</td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td>Fair</td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td>Poor</td>
                                            <td>
                                                <img src="images/rating.jpg" width="14" height="14" alt="" /></td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                            <td>&nbsp;</td>
                                        </tr>
                                    </table>

                                </div>
                            </div>


                            <table width="200" border="0" style="float: left; margin-top: 10px;">
                                <tr>
                                    <td width="10">&nbsp;</td>
                                    <td width="114"><a href="<%=Session["strHttp"]%>tellaFriend.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image28','','<%=Session["strHttp"]%>images/tf_nr.png',1)">
                                    <img src="<%=Session["strHttp"]%>images/tf_hvr.png" name="Image28" width="121" height="34" border="0" id="Image28" /></a>
                                </td>
                                    <td width="62"><a href="<%=Session["strHttp"]%>ratingsystem.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image29','','<%=Session["strHttp"]%>images/work_nr.png',1)">
                                    <img src="<%=Session["strHttp"]%>images/work_hvr.png" name="Image29" width="276" height="34" border="0" id="Img1" /></a></td>
                                </tr>
                            </table>

                        </div>



                    </div>

              </div>
        </div><!--**Content 1 Ends Here**-->

 </div>
    </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>


<asp:Content ID="iScriptContent" ContentPlaceHolderID="ScriptContent" runat="server">
    <script>
        var frmvalidator = new Validator("aspnetForm", "<%=btnSubmit.ClientID%>", "checkError()");
        frmvalidator.addValidation("<%=txtCity.ClientID %>", "minlength=3", "Plese enter atleast 3 characters");
        frmvalidator.addValidation("<%=txtZipCode.ClientID %>", "minlength=5", "Plese enter atleast 5 characters");
        frmvalidator.addValidation("<%=txtLName.ClientID %>", "minlength=3", "Plese enter atleast 3 characters");
        frmvalidator.addValidation("<%=txtFName.ClientID %>", "minlength=1", "Plese enter atleast 3 characters");


        //  onload()
        try {
            workingWin.close();
        } catch (e) { }
    </script>
</asp:Content>
